﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;
using System.Threading;

namespace IDE_Week2_Forms_Project
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("nl");
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form2 f2 = new Form2();
            f2.ShowDialog();
            //f2.Visible = true;
          
        }
        private void ChangeLanguage(string lang)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }


        private void button1_Click(object sender, EventArgs e)
        {

            //if (Icon == Properties.Resources.Icon2)
            //{ Icon = Properties.Resources.Icon1; }

            System.Drawing.Icon icon3 = Properties.Resources.Icon3;
            this.Icon = icon3;

        }


        private void button2_Click(object sender, EventArgs e)
        {
            this.Icon = default(Icon);
        }

        private void button5_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];

        }

        private void button3_Click(object sender, EventArgs e)
        {
            ChangeLanguage("nl");
        }
    }
}
